/*
 * Copyright (c) ShaoxiongDu <Shaoxiong.dev@aliyun.com> 2021 all Rights Reserved
 */

package zh.codegym.task.task07.task0717;

import java.util.ArrayList;
import java.util.Scanner;

/* 
复制单词
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        // 从控制台读取字符串并在此声明 ArrayList
        Scanner scanner = new Scanner(System.in);
        ArrayList<String> list = new ArrayList<String>();
        for (int i = 0; i < 10; i++) {
            list.add(scanner.next());
        }
        ArrayList<String> result = doubleValues(list);

        // 显示结果
        for (String s : result) {
            System.out.println(s);
        }
    }

    public static ArrayList<String> doubleValues(ArrayList<String> list) {
        //在此编写你的代码
        for (int i = 0; i < list.size(); i += 2) {
            list.add(i, list.get(i));
        }
        return list;
    }
}
